/**
 * @author 陈艺博
 * @date 2021-02-20 10:09
 * @description 测试Stack
 **/
public class TestStack {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        testStack(stack);
        Stack02<Integer> stack02 = new Stack02<>();
        testStack02(stack02);
    }

    static void testStack(Stack stack) {

        stack.push(11);
        stack.push(22);
        stack.push(33);
        stack.push(44);
        stack.push(55);

        while (!stack.isEmpty()) {
            System.out.println(stack.pop());
        }
    }

    static void testStack02(Stack02 stack) {

        stack.push(11);
        stack.push(22);
        stack.push(33);
        stack.push(44);
        stack.push(55);

        while (!stack.isEmpty()) {
            System.out.println(stack.pop());
        }
    }
}
